#ifndef __QpwPhysics__
#define __QpwPhysics__

#include <QpwGeometryDatabase.h>
#include <QpwSubType.h>
#include <QpwDecorationObject.h>

class b2Body;
class b2World;

namespace QpwPhysics {

class ObjectData {
public:
    explicit ObjectData( b2Body * body = 0 ) : p_body(body) {}
    virtual ~ObjectData() {}

    b2Body * body() const { return p_body; }

    static ObjectData * fromGeometry( b2World * world, const QpwWorld::Geometry & geometry,
        QpwWorld::DecorationObject::ObjectTypes type );
    static ObjectData * fromSubType( b2World * world, const QpwSubType & subType,
        const QpwGeometryDatabase & geometryDatabase );

private:
    b2Body * p_body;

};

class StaticObjectData : public ObjectData {
public:
    explicit StaticObjectData( b2Body * body = 0 ) : ObjectData(body) {}
    virtual ~StaticObjectData() {}

};

class DynamicObjectData : public ObjectData {
public:
    explicit DynamicObjectData( b2Body * body = 0 ) : ObjectData(body) {}
    virtual ~DynamicObjectData() {}

};

};

#endif//__QpwPysics__
